﻿<div class="w">
    <div class="cart-left">
        <div class="m" id="succeed">
            <div class="success">
                <div class="success-b">
                    <h3>商品已成功加入购物车！</h3>
                    <span style="display:none">商品数量有限，请您尽快下单并付款！</span><!--如果商品数量只有1， 提示-->
                </div>
                <span><a href="/cart/cart" class="btn-pay">去结算</a><a href="/product/detail/@ViewBag.ProductId" class="btn-continue">继续购物</a></span>
            </div>
        </div><!--succeed end-->
    </div>
    <!--left end-->
    <div class="right-extra-cart">

        <div class="m" id="mycart-detail">
            <div class="mt"><h2><s></s>我的购物车</h2></div>
            @{var product = ViewBag.Current as Himall.Web.Areas.Web.Models.CartItemModel;}
            @if (product != null)
            {
                <div class="mc" id="cart_content">
                    <!--刚加入的商品 start-->
                    <h3>刚加入购物车的商品</h3>
                    <dl class="new">
                        <dt class="p-img"><a href="/product/detail/@(product.id)" target="_blank"><img src="@product.imgUrl" alt="" /></a></dt>
                        <dd class="p-info">
                            <div class="p-name"><a href="/product/detail/@(product.id)" target="_blank">@product.name</a></div>
                            <div class="p-price"><span>@product.price.ToString("F2")</span><em>×@product.count</em></div>
                        </dd>
                    </dl>
                    <!--其它商品 start-->
                    <h3>您购物车中的其它商品</h3>

                    @{var products = (IEnumerable<Himall.Web.Areas.Web.Models.CartItemModel>)ViewBag.Others; }
                    @foreach (var item in products)
                    {
                        <dl class="old">
                            <dt class="p-img"><a href="/product/detail/@(item.id)" target="_blank"><img src="@item.imgUrl" alt="" /></a></dt>
                            <dd class="p-info">
                                <div class="p-name"><a href="/product/detail/@(item.id)" target="_blank">@item.name</a></div>
                                <div class="p-price"><span>@item.price.ToString("F2")</span><em>×@item.count</em></div>
                            </dd>
                        </dl>
                    }
                    <div class="total">共<strong>@ViewBag.TotalCount</strong>件商品<br />金额总计：<strong>@ViewBag.Amount.ToString("F2")</strong></div>
                    <div class="btns"><a href="/cart/cart" class="btn-pay">去结算</a></div>
                </div>
            }
        </div><!--my-cart end-->
    </div>
    <span class="clr"></span>
</div>
<script>
    $(function () {
        refreshCartProducts();
    });

</script>